<template>
	<view class="">
		<view v-if="showtime" class="justify-center padding-tb-sm">
			<text class="text-center text-sm text-qqwhite">{{showtime}}</text>
		</view>
		<!-- 文字消息 -->
		<template v-if="item.role === 'doctor'">
			<view class="flex-direction-row margin-tb-sm justify-end">
				<view class="margin-right-sm flex-direction-row align-center padding-tb-sm padding-lr color-black radius-xl bg-blue" style="max-width: 500rpx">
					<text class="text-fl">{{item.content}}</text>
				</view>
				<image :src="item.avatar || '/static/images/user.png'" class="cu-avatar round" mode="widthFix"></image>
			</view>
		</template>
		<template v-else>
			<view class="flex-direction-row margin-tb-sm">
				<image :src="item.avatar || '/static/images/user.png'" class="cu-avatar round" mode="widthFix"></image>
				<view class="margin-left-sm padding-tb-sm padding-lr color-black bg-white radius-xl" style="max-width: 500rpx">
					<text class="text-fl">{{item.content}}</text>
				</view>
			</view>
		</template>
	</view>
</template>

<script>
	export default {
		mounted() {
			
		},
		computed: {
			
		},
		props: {
			item: {
				type: Object,
				default: {}
			},
			showtime: {
				type: String,
				default: ""
			}
		},
		data() {
			return {
				
			};
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
